import request from '@/utils/request'

export function login(data) {
  // console.log(data);
  return request({
    url: '/sys/login',
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: '/sys/profile',
    method: 'post',
  })
}
// 头像获取
export const getAvar = (Id) => request({ url: `/sys/user/${Id}` });

export function logout() {
  // return request({
  //   url: '/vue-admin-template/user/logout',
  //   method: 'post'
  // })
}


// 获取某个用户的信息
export const getUserDetailById = (id) => request({
  url: `/sys/user/${id}`
})